summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFengChen <vonchenplus@gmail.com>2022-12-17 03:22:50 +0100
committerFengChen <vonchenplus@gmail.com>2022-12-26 05:20:49 +0100
commit6a397bc8eda2f239dd8823f342f164cc0fec9c41 (patch)
treee499d53c87a52cb1b1c9666a62e44a07c2e58f19
parentvideo_core: Implement vulkan QuadStrip topology (diff)
downloadyuzu-6a397bc8eda2f239dd8823f342f164cc0fec9c41.tar
yuzu-6a397bc8eda2f239dd8823f342f164cc0fec9c41.tar.gz
yuzu-6a397bc8eda2f239dd8823f342f164cc0fec9c41.tar.bz2
yuzu-6a397bc8eda2f239dd8823f342f164cc0fec9c41.tar.lz
yuzu-6a397bc8eda2f239dd8823f342f164cc0fec9c41.tar.xz
yuzu-6a397bc8eda2f239dd8823f342f164cc0fec9c41.tar.zst
yuzu-6a397bc8eda2f239dd8823f342f164cc0fec9c41.zip
-rw-r--r--src/video_core/renderer_vulkan/maxwell_to_vk.cpp19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/video_core/renderer_vulkan/maxwell_to_vk.cpp b/src/video_core/renderer_vulkan/maxwell_to_vk.cpp
index 347cfc133..ca52e2389 100644
--- a/src/video_core/renderer_vulkan/maxwell_to_vk.cpp
+++ b/src/video_core/renderer_vulkan/maxwell_to_vk.cpp
@@ -301,6 +301,8 @@ VkPrimitiveTopology PrimitiveTopology([[maybe_unused]] const Device& device,
return VK_PRIMITIVE_TOPOLOGY_POINT_LIST;
case Maxwell::PrimitiveTopology::Lines:
return VK_PRIMITIVE_TOPOLOGY_LINE_LIST;
+ case Maxwell::PrimitiveTopology::LineLoop:
+ return VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST;
case Maxwell::PrimitiveTopology::LineStrip:
return VK_PRIMITIVE_TOPOLOGY_LINE_STRIP;
case Maxwell::PrimitiveTopology::Triangles:
@@ -309,6 +311,14 @@ VkPrimitiveTopology PrimitiveTopology([[maybe_unused]] const Device& device,
return VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP;
case Maxwell::PrimitiveTopology::TriangleFan:
return VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN;
+ case Maxwell::PrimitiveTopology::LinesAdjacency:
+ return VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY;
+ case Maxwell::PrimitiveTopology::LineStripAdjacency:
+ return VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY;
+ case Maxwell::PrimitiveTopology::TrianglesAdjacency:
+ return VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY;
+ case Maxwell::PrimitiveTopology::TriangleStripAdjacency:
+ return VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY;
case Maxwell::PrimitiveTopology::Quads:
case Maxwell::PrimitiveTopology::QuadStrip:
// TODO: Use VK_PRIMITIVE_TOPOLOGY_QUAD_LIST_EXT/VK_PRIMITIVE_TOPOLOGY_QUAD_STRIP_EXT
@@ -316,10 +326,13 @@ VkPrimitiveTopology PrimitiveTopology([[maybe_unused]] const Device& device,
return VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST;
case Maxwell::PrimitiveTopology::Patches:
return VK_PRIMITIVE_TOPOLOGY_PATCH_LIST;
- default:
- UNIMPLEMENTED_MSG("Unimplemented topology={}", topology);
- return {};
+ case Maxwell::PrimitiveTopology::Polygon:
+ LOG_WARNING(Render_Vulkan, "Draw mode is Polygon with a polygon mode of lines should be a "
+ "single body and not a bunch of triangles.");
+ return VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN;
}
+ UNIMPLEMENTED_MSG("Unimplemented topology={}", topology);
+ return {};
}
VkFormat VertexFormat(const Device& device, Maxwell::VertexAttribute::Type type,